'use strict';

/**
 * @ngdoc function
 * @name consoleAngularUiApp.service:instacne
 * @description
 * # InstaceServ
 * Cloud Instacnes service of the consoleAngularUiApp
 */
angular.module('consoleAngularUiApp').factory('$instacnesServ', ['$resource', function($resource){

	return $resource('/api/rest/rprm/nodes/:id', {id: '@nodeId'}, {
		query: {
			isArray: true,
			headers: {
				'Accept': 'application/vnd.plcm.plcm-node-list+json'
			}
		},
		save: {
			method: 'POST',
			headers: {
				'Content-Type': 'application/vnd.plcm.plcm-node+json'
			}
		},
		update: {
			method: 'PUT',
			headers: {
				'Content-Type': 'application/vnd.plcm.plcm-node+json'
			}
		},
		delete: {
			method: 'DELETE',
			headers: {
				'Content-Type': 'application/vnd.plcm.plcm-node+json'
			}
		}
	});

}])